package com.fusion.lottery.auth.controller;

import javax.validation.Valid;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.fusion.lottery.auth.service.RegistService;
import com.fusion.lottery.entity.auth.Regist;
import com.fusion.utils.json.Msg;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;

/**
 * 注册接口
 * @ClassName: RegistController 
 * @Description: TODO
 * @author louis
 * @date 2018年5月7日 上午1:57:30
 */
@Api(description="注册接口")
@RestController
@RequestMapping(value = "/regist")
public class RegistController {
	
	@Autowired
	private RegistService registService;
	
	@ApiOperation(value="用户注册", notes="用户注册")
	@ApiImplicitParam(name = "regist", value = "注册实体", required = true, dataType = "Regist")
	@PostMapping
	public Msg list(@Valid @RequestBody Regist regist) {
		return registService.Regist(regist);
	}
    
}